Beginning Programming for Dummies by Wallace Wang

Beginning Programming for Dummies by Wallace Wang

Author:Wallace Wang
Language: eng
Format: epub, pdf
Publisher: Wiley


function functionName Variable

-- One or more instructions here

return value

end functionName

The following creates a Revolution function that calculates the cube of a number:

on mouseUp

put cube(3) into answer

put “The cube of 3 is = “ && answer into message

end mouseUp

function cube x

return x * x * x

end cube

This Revolution program is stored in the Revolution Sample Programs folder as Chapter 11 - Function.rev.

Chapter 12

Storing Stuff in Arrays

In This Chapter

Creating an array

Using an array to store data

Creating dynamic arrays

Making a multi-dimensional array



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.